#!/bin/bash

# create directory
mkdir -p ~/workspace/tool

# change directory
cd ~/workspace/tool

# clone mac-backup code
git clone git@gitee.com:yulu86/mac-backup.git
cd mac-backup
git remote add upstream git@github.com:yulu86/mac-backup.git
git fetch --all

echo '=================================== Start to setup... ==================================='

# 设置bash
chmod +x bash/setup_bash.sh
bash/setup_bash.sh

# 设置hosts
chmod +x hosts/setup_hosts.sh
hosts/setup_hosts.sh

# 安装&设置Homebrew
chmod +x brew/setup_brew.sh
brew/setup_brew.sh

# setup
echo '==================================================================================================='
echo '==================================================================================================='
echo '                                                                                                   '
echo '                                                                                                   '
echo '                                                                                                   '
echo '========================================= All setup success! ======================================'
echo '                                                                                                   '
echo '                                                                                                   '
echo '                                                                                                   '
echo '========================================= Congratulations! ========================================'
echo '                                                                                                   '
echo '                                                                                                   '
echo '                                                                                                   '
echo '==================================================================================================='
echo '==================================================================================================='
